home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / OPENMULT / SOURCE / MAC_#INC.C
Text File  |  1991-11-24  |  7KB  |  545 lines

  1. /*
  2.     File: Mac #includes.c
  3.     
  4.     Modified by R.Street to include the headers needed for
  5.     the Editable Fields demo.
  6.     
  7.     Basically I turned on things like the
  8.         Color Picker Package
  9.         Gestalt
  10.         Traps
  11.         
  12.     and
  13.         included stdlib.h, math.h, stdio.h at the bottom.
  14.         
  15.     This file SHOULD be precomplied to a file called
  16.     "Headers" and put in the same folder as the project.
  17.     
  18. */
  19.  
  20.  
  21. /*
  22.  *  Mac #includes.c - source to MacHeaders
  23.  *
  24.  *  To add a header, change its "#if 0" to "#if 1".
  25.  *
  26.  *  To remove a header, change its "#if 1" to "#if 0".
  27.  *
  28.  *  There are some conflicts and order dependencies among the various
  29.  *  headers:
  30.  *
  31.  *    Ñ    <Printing.h> and <PrintTraps.h> cannot both be included.
  32.  *
  33.  *    Ñ    <LoMem.h> and <SysEqu.h> cannot both be included.
  34.  *
  35.  *    Ñ    <asm.h> and <Traps.h>, if both are included, must appear
  36.  *        in that order.  If <Traps.h> is included, traps used in
  37.  *        inline assembly must appear without leading underscores.
  38.  *
  39.  *  If the "Check Pointer Types" option is disabled during the
  40.  *  precompilation process, trap definitions will be stored in
  41.  *  such a way that when a trap is called (in a source file that
  42.  *  #includes the precompiled header), pointer arguments to the
  43.  *  trap will not be matched against the types of corresponding
  44.  *  formal parameters.
  45.  *
  46.  *  This is accomplished by storing "simplified" prototypes for
  47.  *  traps, in which any argument of pointer type is stored as
  48.  *  "void *".  The result closely resembles the treatment of traps
  49.  *  in pre-5.0 versions of THINK C.
  50.  *
  51.  *  (Note that this file is written in such a way that it is immune
  52.  *  to the actual compiler setting of "Check Pointer Types".  Use
  53.  *  the "SIMPLIFY_PROTOTYPES" macro, below, to control whether full
  54.  *  prototypes are retained.)
  55.  *
  56.  */
  57.  
  58. #define _H_MacHeaders
  59.  
  60.  
  61. // set this to 0 (zero) to retain full prototypes
  62. // set this to 1 (one) for "simplified" prototypes
  63. #define SIMPLIFY_PROTOTYPES        1
  64.  
  65.  
  66. // prototype checking level
  67. #if SIMPLIFY_PROTOTYPES
  68.     #if !__option(check_ptrs)
  69.         #undef SIMPLIFY_PROTOTYPES
  70.     #endif
  71.     #pragma options(!check_ptrs)
  72. #else
  73.     #if __option(check_ptrs)
  74.         #undef SIMPLIFY_PROTOTYPES
  75.     #endif
  76.     #pragma options(check_ptrs)
  77. #endif
  78.  
  79.  
  80. // ADSP
  81.     #if 0
  82.         #include <ADSP.h>
  83.     #endif
  84.  
  85. // AIFF
  86.     #if 0
  87.         #include <AIFF.h>
  88.     #endif
  89.  
  90. // Aliases
  91.     #if 1
  92.         #ifdef __APPLETALK__
  93.             #include <Aliases.h>
  94.         #else
  95.             #define __APPLETALK__            // suppress unnecessary #include <AppleTalk.h>
  96.             #include <Aliases.h>
  97.             #undef __APPLETALK__
  98.         #endif
  99.     #endif
  100.  
  101. // AppleEvents
  102.     #if 0
  103.         #ifdef __EPPC__
  104.             #include <AppleEvents.h>
  105.         #else
  106.             #define __EPPC__                // suppress unnecessary #include <EPPC.h>
  107.             #include <AppleEvents.h>
  108.             #undef __EPPC__
  109.         #endif
  110.     #endif
  111.  
  112. // AppleTalk
  113.     #if 0
  114.         #include <AppleTalk.h>
  115.     #endif
  116.  
  117. // Balloons
  118.     #if 0
  119.         #ifdef __TRAPS__
  120.             #include <Balloons.h>
  121.         #else
  122.             #define __TRAPS__                // suppress unnecessary #include <Traps.h>
  123.             #define _Pack14 0xA830            // (well, mostly unnecessary...)
  124.             #include <Balloons.h>
  125.             #undef _Pack14
  126.             #undef __TRAPS__
  127.         #endif
  128.     #endif
  129.  
  130. // BDC
  131.     #if 1
  132.         #include <BDC.h>
  133.     #endif
  134.  
  135. // CommResources
  136.     #if 0
  137.         #include <CommResources.h>
  138.     #endif
  139.  
  140. // Connections
  141.     #if 0
  142.         #include <Connections.h>
  143.     #endif
  144.  
  145. // ConnectionTools
  146.     #if 0
  147.         #include <ConnectionTools.h>
  148.     #endif
  149.  
  150. // Controls
  151.     #if 1
  152.         #include <Controls.h>
  153.     #endif
  154.  
  155. // CRMSerialDevices
  156.     #if 0
  157.         #include <CRMSerialDevices.h>
  158.     #endif
  159.  
  160. // CTBUtilities
  161.     #if 0
  162.         #include <CTBUtilities.h>
  163.     #endif
  164.  
  165. // DatabaseAccess
  166.     #if 0
  167.         #include <DatabaseAccess.h>
  168.     #endif
  169.  
  170. // Desk
  171.     #if 1
  172.         #include <Desk.h>
  173.     #endif
  174.  
  175. // DeskBus
  176.     #if 0
  177.         #include <DeskBus.h>
  178.     #endif
  179.  
  180. // Devices
  181.     #if 1
  182.         #include <Devices.h>
  183.     #endif
  184.  
  185. // Dialogs
  186.     #if 1
  187.         #include <Dialogs.h>
  188.     #endif
  189.  
  190. // DiskInit
  191.     #if 1
  192.         #include <DiskInit.h>
  193.     #endif
  194.  
  195. // Disks
  196.     #if 0
  197.         #include <Disks.h>
  198.     #endif
  199.  
  200. // Editions
  201.     #if 0
  202.         #include <Editions.h>
  203.     #endif
  204.  
  205. // ENET
  206.     #if 0
  207.         #include <ENET.h>
  208.     #endif
  209.  
  210. // EPPC
  211.     #if 0
  212.         #include <EPPC.h>
  213.     #endif
  214.  
  215. // Errors
  216.     #if 1
  217.         #include <Errors.h>
  218.     #endif
  219.  
  220. // Events
  221.     #if 1
  222.         #include <Events.h>
  223.     #endif
  224.  
  225. // Files
  226.     #if 1
  227.         #include <Files.h>
  228.     #endif
  229.  
  230. // FileTransfers
  231.     #if 0
  232.         #include <FileTransfers.h>
  233.     #endif
  234.  
  235. // FileTransferTools
  236.     #if 0
  237.         #include <FileTransferTools.h>
  238.     #endif
  239.  
  240. // Finder
  241.     #if 0
  242.         #include <Finder.h>
  243.     #endif
  244.  
  245. // FixMath
  246.     #if 0
  247.         #include <FixMath.h>
  248.     #endif
  249.  
  250. // Folders
  251.     #if 0
  252.         #include <Folders.h>
  253.     #endif
  254.  
  255. // Fonts
  256.     #if 1
  257.         #include <Fonts.h>
  258.     #endif
  259.  
  260. // GestaltEqu
  261.     #if 1
  262.         #include <GestaltEqu.h>
  263.     #endif
  264.  
  265. // Graf3D
  266.     #if 0
  267.         #include <Graf3D.h>
  268.     #endif
  269.  
  270. // HyperXCmd
  271.     #if 0
  272.         #include <HyperXCmd.h>
  273.     #endif
  274.  
  275. // Icons
  276.     #if 0
  277.         #include <Icons.h>
  278.     #endif
  279.  
  280. // Language
  281.     #if 0
  282.         #include <Language.h>
  283.     #endif
  284.  
  285. // Lists
  286.     #if 1
  287.         #include <Lists.h>
  288.     #endif
  289.  
  290. // Memory
  291.     #if 1
  292.         #include <Memory.h>
  293.     #endif
  294.  
  295. // Menus
  296.     #if 1
  297.         #include <Menus.h>
  298.     #endif
  299.  
  300. // MIDI
  301.     #if 0
  302.         #include <MIDI.h>
  303.     #endif
  304.  
  305. // Notification
  306.     #if 1
  307.         #include <Notification.h>
  308.     #endif
  309.  
  310. // OSEvents
  311.     #if 1
  312.         #include <OSEvents.h>
  313.     #endif
  314.  
  315. // OSUtils
  316.     #if 1
  317.         #include <OSUtils.h>
  318.     #endif
  319.  
  320. // Packages
  321.     #if 1
  322.         #include <Packages.h>
  323.     #endif
  324.  
  325. // Palette
  326.     #if 0
  327.         #include <Palette.h>
  328.     #endif
  329.  
  330. // Palettes
  331.     #if 0
  332.         #include <Palettes.h>
  333.     #endif
  334.  
  335. // Picker
  336.     #if 1
  337.         #include <Picker.h>
  338.     #endif
  339.  
  340. // PictUtil
  341.     #if 0
  342.         #include <PictUtil.h>
  343.     #endif
  344.  
  345. // Power
  346.     #if 0
  347.         #include <Power.h>
  348.     #endif
  349.  
  350. // PPCToolBox
  351.     #if 0
  352.         #include <PPCToolBox.h>
  353.     #endif
  354.  
  355. // Printing
  356.     #if 0
  357.         #include <Printing.h>
  358.     #endif
  359.  
  360. // PrintTraps
  361.     #if 0
  362.         #include <PrintTraps.h>
  363.     #endif
  364.  
  365. // Processes
  366.     #if 0
  367.         #include <Processes.h>
  368.     #endif
  369.  
  370. // QDOffscreen
  371.     #if 0
  372.         #include <QDOffscreen.h>
  373.     #endif
  374.  
  375. // Quickdraw
  376.     #if 1
  377.         #include <Quickdraw.h>
  378.     #endif
  379.  
  380. // Resources
  381.     #if 1
  382.         #include <Resources.h>
  383.     #endif
  384.  
  385. // Retrace
  386.     #if 0
  387.         #include <Retrace.h>
  388.     #endif
  389.  
  390. // ROMDefs
  391.     #if 0
  392.         #include <ROMDefs.h>
  393.     #endif
  394.  
  395. // SANE
  396.     #if 0
  397.         #include <SANE.h>
  398.     #endif
  399.  
  400. // Scrap
  401.     #if 1
  402.         #include <Scrap.h>
  403.     #endif
  404.  
  405. // Script
  406.     #if 0
  407.         #include <Script.h>
  408.     #endif
  409.  
  410. // SCSI
  411.     #if 0
  412.         #include <SCSI.h>
  413.     #endif
  414.  
  415. // SegLoad
  416.     #if 1
  417.         #include <SegLoad.h>
  418.     #endif
  419.  
  420. // Serial
  421.     #if 0
  422.         #include <Serial.h>
  423.     #endif
  424.  
  425. // ShutDown
  426.     #if 0
  427.         #include <ShutDown.h>
  428.     #endif
  429.  
  430. // Slots
  431.     #if 0
  432.         #include <Slots.h>
  433.     #endif
  434.  
  435. // Sound
  436.     #if 0
  437.         #include <Sound.h>
  438.     #endif
  439.  
  440. // SoundInput
  441.     #if 0
  442.         #include <SoundInput.h>
  443.     #endif
  444.  
  445. // StandardFile
  446.     #if 1
  447.         #include <StandardFile.h>
  448.     #endif
  449.  
  450. // Start
  451.     #if 0
  452.         #include <Start.h>
  453.     #endif
  454.  
  455. // SysEqu
  456.     #if 0
  457.         #include <SysEqu.h>
  458.     #endif
  459.  
  460. // Terminals
  461.     #if 0
  462.         #include <Terminals.h>
  463.     #endif
  464.  
  465. // TerminalTools
  466.     #if 0
  467.         #include <TerminalTools.h>
  468.     #endif
  469.  
  470. // TextEdit
  471.     #if 1
  472.         #include <TextEdit.h>
  473.     #endif
  474.  
  475. // Timer
  476.     #if 1
  477.         #include <Timer.h>
  478.     #endif
  479.  
  480. // ToolUtils
  481.     #if 1
  482.         #include <ToolUtils.h>
  483.     #endif
  484.  
  485. // Types
  486.     #if 1
  487.         #include <Types.h>
  488.     #endif
  489.  
  490. // Values
  491.     #if 0
  492.         #include <Values.h>
  493.     #endif
  494.  
  495. // Video
  496.     #if 0
  497.         #include <Video.h>
  498.     #endif
  499.  
  500. // Windows
  501.     #if 1
  502.         #include <Windows.h>
  503.     #endif
  504.  
  505. // pascal.h
  506.     #if 1
  507.         #include <pascal.h>
  508.     #endif
  509.  
  510. // asm.h
  511.     #if 1
  512.         #include <asm.h>
  513.     #endif
  514.  
  515. // LoMem
  516.     #if 1
  517.         #include <LoMem.h>
  518.     #endif
  519.  
  520. // THINK
  521.     #if 1
  522.         #include <THINK.h>
  523.     #endif
  524.  
  525. // Traps
  526.     #if 1
  527.         #include <Traps.h>
  528.     #endif
  529.  
  530.  
  531. // restore "Check Pointer Types" to previous setting
  532. #if SIMPLIFY_PROTOTYPES
  533.     #pragma options(check_ptrs)
  534. #elif defined(SIMPLIFY_PROTOTYPES)
  535.     #pragma options(!check_ptrs)
  536. #endif
  537. #undef SIMPLIFY_PROTOTYPES
  538.  
  539.  
  540. #include <stdlib.h>
  541. #include <stdio.h>
  542. #include <math.h>
  543. #include <stdarg.h>
  544. #include <string.h>
  545.